import request from '@/utils/request'

export function getPage(data){ 
    return request({
        url: `/measure/page?keyword=${data.keyword}&page=${data.page}&limit=${data.limit}`,
        method: 'get',  //query
      })
}

export function addMeasure(data){ 
  return request({
      url: `/measure/addMeasure`,
      method: 'post',
      data:data   //body
    })
}

export function updateMeasure(data){ 
  return request({
      url: `/measure/updateMeasure`,
      method: 'post',
      data:data
    })
}

export function deleteMeasure(data){ 
  return request({
      url: `/measure/deleteMeasure?measureId=${data.measureId}`,
      method: 'post',
    })
}

export function deleteMeasures(data){ 
  return request({
      url: `/measure/deleteMeasures?measureIds=${data.item}`,
      method: 'post',
    })
}